<script src="test.js"></script>
<script>
  window.test = window.test * 2;
</script>